<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td class="bgtitle">
            <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                <tr>
                    <td width="20">
                        <img src="/templates/images/mui_ten.gif" />
                    </td>
                    <td valign="bottom" class="title">Danh sách đơn đặt hàng</td>
                    <td width="10" valign="bottom">&nbsp;</td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td valign="top" >&nbsp;</td>
    </tr>
</table>
<table width='98%' align='center' border='0' cellpadding='2' cellspacing='0' bordercolor='#CCCCCC' style='border-collapse:collapse'>
        <tr>
        <td height='30' class='bgmenupro border3' bgcolor='#DDDDDD' width='5%'>
            <div align='center'>
                <strong>STT</strong>
            </div>
        </td>
        <td class='bgmenupro border3' bgcolor='#DDDDDD' width='15%'>
            <div align='center'>
                <strong>Ngày đặt hàng</strong>
            </div>
        </td>
        <td class='bgmenupro border3' bgcolor='#DDDDDD' width='20%'>
            <div align='center'>
                <strong>Mã đơn hàng</strong>
            </div>
        </td>
        <td class='bgmenupro border3' bgcolor='#DDDDDD' width='20%'>
            <div align='center'>
                <strong>Tổng giá trị thanh toán</strong>
            </div>
        </td>
        <td class='bgmenupro border3' bgcolor='#DDDDDD' >
            <div align='center'>
                <strong>Tình trạng</strong>
            </div>
        </td>
        <td class='bgmenupro borderfull' bgcolor='#DDDDDD' width='15%'>
            <div align='center'>
                <strong>Ngày giao hàng</strong>
            </div>
        </td>
    </tr>
    <!--load đơn hàng-->
    {foreach from=$listorder item=order}    
        <tr>
            <td class='border3'>
                <div align='center'>{$order@index+1}</div>
            </td><td class='border3'>
                <div align='center'>{$order.orderdatecreate|date_format:"%d-%m-%Y | %H:%M:%S"}</div>
            </td>
            <td class='border3'>
                <div align='center'>
                    <a href="/detailorder/{$order.ordercode}" onclick="NewWindow(this.href,'MPCamera','900','650','yes');return false">
                        <strong>{$order.ordercode}</strong>
                    </a>
                </div>
            </td>
            <td class=' fontred fontsizecart border3'>
                <div align='center'>{$order.totalprice|number_format} VNĐ</div>
            </td>
            <td class=' fontsizecart border3'>
                <div align='center'>{$order.statusname}</div>
            </td>  
            <td class='borderfull'>
                <div align='center'>{$order.orderdateship|date_format:"%d-%m-%Y"}
                </div>
            </td>
        </tr>
    {/foreach}
    <!--load xong -->
</table>
<br />
<!-- begin: popup!-->
<script language="javascript">
    var win = null;
    function NewWindow(mypage,myname,w,h,scroll){
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
    win = window.open(mypage,myname,settings)
}

</script>
<!-- end: popup!-->

